package top.ezzz.search.model;

import cn.hutool.json.JSONObject;

/**
 * @author noear
 * @since 1.0.14
 */
public class EsHighlightField {

    private final JSONObject oNode;

    public EsHighlightField(JSONObject oNode) {
        this.oNode = oNode;
    }


    public EsHighlightField preTags(String tags) {
        oNode.set("pre_tags", tags);
        return this;
    }

    public EsHighlightField postTags(String tags) {
        oNode.set("post_tags", tags);
        return this;
    }

    public EsHighlightField requireMatch(boolean requireMatch) {
        oNode.set("require_field_match", requireMatch);
        return this;
    }
}
